package com.tanhua.dubbo.api;

import com.tanhua.model.enums.CommentType;
import com.tanhua.model.mongo.Comment;
import com.tanhua.model.vo.PageResult;

import java.util.List;

public interface CommentApi {
    List<Comment> findComments(String movementId, CommentType comment, Integer page, Integer pagesize);

    Integer save(Comment comment);

    Boolean hasComment(String movementId, Long userId, CommentType like);

    Integer delete(Comment comment);

    Comment findById(String commentId);

    Integer updateComment(Comment comment);

    void updateCommentByDislike(Comment comment);

    PageResult findCommentsByPage(String movementId, CommentType comment, Integer page, Integer pagesize);

    Integer saveVideoComment(Comment comment);

    //根据评论id，修改评论点赞数+1.返回更新后的点赞数
    Integer saveLikeComment(String commentId);

    //根据评论id，修改评论点赞数-1.返回更新后的点赞数
    Integer deleteLikeComment(String commentId);

    //根据发布者id，分页条件，查询并返回评论集合
    List<Comment> getCommentsByPublishUserId(Long publishUserId, int type, int page, int pagesize);

    Boolean videoComment(String videoId, Long userId, CommentType like);

    void saveVideo(Comment comment);

    void deleteVideo(Comment comment);

}
